import fetch from '@/utils/fetch'

export function deleteById(id) {
  return fetch({
    url: `/my-excel-list/?id=${id}`,
    method: 'DELETE'
  })
}

export function getfilelist() {
  return fetch({
    url: '/my-excel-list',
    method: 'GET'
  })
}

export function uploadimage(file) {
  let param = new FormData()
  param.append('file', file)
  return fetch({
    url: '/my-image-list/',
    method: 'POST',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

export function getimageList() {
  return fetch({
    url: '/my-image-list',
    method: 'GET'
  })
}